<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
	</head>
	<body>
		<div id="app">
			<!-- 动态参数绑定-->
			<a v-bind:[attribute]='url'>xxx</a>
			<!--
			 修饰符 (modifier) 是以半角句号 . 指明的特殊后缀，
			 用于指出一个指令应该以特殊方式绑定。例如，.prevent 
			 修饰符告诉 v-on 指令对于触发的事件调用 event.preventDefault()：
			 -->
			<form v-on:submit.prevent="onSubmit" v-on:submit="onSubmit2">
				<p>我是表单开头</p>
				<button>submit</button>
			</form>
		</div>	
		<script>
			
			let app=new Vue({
				el:'#app',
				data:{
					attribute:'href',
					url:'https://cdn.jsdelivr.net/npm/vue/dist/vue.js'
				},
				methods:{
					onSubmit:function(){
						console.log('onSubmit from...');
					},
					onSubmit2:function(){
						console.log('onSubmit2...');
					}
				}
			});
		</script>	
		<style>
			.red{color: red;}
			.blue{color: blue;font-size: 100px;}
		</style>
	</body>
</html>
